<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="renderer" content="webkit">
	    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<title>股票操作</title>
		 <link rel="stylesheet" href="__PUBLIC__/frame/layui/css/layui.css">
		<!--<link rel="stylesheet" href="http://cdn.datatables.net/1.10.13/css/jquery.dataTables.min.css">-->
		<link rel="stylesheet" href="__PUBLIC__/frame/static/css/style.css">
	</head>
	<body>
		<a href="<?php echo U('Service/lst');?>" class="layui-btn" style="margin-top: 10px; "><i class="layui-icon">&#xe603;</i>客户列表</a>
		<a class="layui-btn btn-add btn-default" id="btn-refresh" style="margin-top: 10px;"><i class="layui-icon">&#x1002;</i></a>
		<form class="layui-form" action="__SELF__" method="post">
			</br>
			<div class="layui-form-item">
					<input type="hidden" name="cus_id" value="{$cus_id}" />			    				 				  
				    <div class="layui-inline">
				      <label class="layui-form-label">股票代码</label>
				      <div class="layui-input-inline">
				        <input type="text" name="stock_code" autocomplete="off" class="layui-input">
				      </div>
				    </div>
				    <div class="layui-inline">
				      <label class="layui-form-label">股票名称</label>
				      <div class="layui-input-inline">
				        <input type="text" name="stock_name" autocomplete="off" class="layui-input">
				      </div>
				    </div>
		    </div>
			
			
			<div class="layui-form-item">			    				 				  
				    <div class="layui-inline">
				      <label class="layui-form-label">操作价位</label>
				      <div class="layui-input-inline">
				        <input type="text" name="sale_price" autocomplete="off" class="layui-input">
				      </div>
				    </div>
				    <div class="layui-inline">
				      <label class="layui-form-label">数量</label>
				      <div class="layui-input-inline">
				        <input type="text" name="position_num" autocomplete="off" class="layui-input">
				      </div>
				      <font color="red" size="3" style="line-height:38px;">* 卖出为‘-’，买入为‘+’</font>
				    </div>
		        </div>
			
			
			<div class="layui-inline">
					    <label class="layui-form-label">来源</label>
					    <div class="layui-input-block">
					      <select name="source" lay-filter="aihao">
					        <option value="">请选择</option>
					        <?php foreach ($type as $k => $v):?>
					        <option value="{$v['name']}">{$v['name']}</option>
					        <?php endforeach;?>			      
					      </select>
					    </div>
			</div>
			
 									
			<div class="layui-form-item" style="margin-top: 10px;">
				    <div class="layui-input-block">
				      <button type="submit" class="layui-btn bbb" lay-submit="" lay-filter="demo1">立即提交</button>
				      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
				    </div>
			</div>
			
		</form>
		
	</body>
    <script type="text/javascript" src="__PUBLIC__/frame/layui/layui.js"></script>
	<script>
	layui.use(['form', 'jquery','layer','layedit', 'laydate'], function(){
	  var form = layui.form
	  ,   	$= layui.jquery
	  ,layer = layui.layer
	  ,layedit = layui.layedit
	  ,laydate = layui.laydate;		
	  //刷新按钮 
	  $('#btn-refresh').on('click', function () {
            location.reload();
      });
      $('input[name=stock_code]').blur(function(){
      		var b = /002[\d]{3}|000[\d]{3}|300[\d]{3}|600[\d]{3}|60[\d]{4}/; 
	      	if(!b.test($('input[name=stock_code]').val()) || $('input[name=stock_code]').val()==''){
		      	layer.msg('股票代码不正确！');
		      	return false;
      		}       
      });
      
	});		


	
</script>
</html>
